<div th:fragment="treeComment(parent,comment,max)">
	<div th:id="'comment'+${comment.id}" class="media"
		th:data-p="${comment.parent == null ? '' : comment.parent.id}">
		<a class="pull-left"
			th:attr="target=${comment.website == null ? null : '_blank'},href=${comment.website == null ? null : comment.website},rel=${(comment.admin || comment.website == null) ? null : 'external nofollow'}">
			<img class="media-object"
			th:src="${comment.gravatar == null ? urls.url+'/static/img/guest.png' : gravatarPrefix+comment.gravatar}"
			data-holder-rendered="true" style="width: 64px; height: 64px;">
		</a>
		<div class="media-body">
			<h5 class="media-heading">
				<strong><span class="glyphicon glyphicon-user"
					style="color: red" title="管理员" th:if="${comment.admin}"></span><span
					th:text="${comment.nickname}"></span></strong>&nbsp;&nbsp;&nbsp;<span
					th:if="${parent != null}" th:remove="tag"> <span
					class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>&nbsp;&nbsp;
					<span class="glyphicon glyphicon-user" style="color: red"
					title="管理员" th:if="${parent.admin}"></span><span
					th:text="${parent.nickname}"></span>
				</span>
			</h5>
			<p style="word-break: break-all" th:utext="${comment.content}"></p>
			<h5>
				<span
					th:text="${times.format(comment.commentDate,'yyyy-MM-dd HH:mm')}" th:data-timestamp="${times.getTime(comment.commentDate)}"></span>&nbsp;&nbsp;&nbsp;
				<a href="###" th:if="${user != null}"
					th:onclick="'removeComment(\''+${comment.id}+'\')'"
					style="margin-right: 8px"><span
					class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> <a
					href="###"
					th:if="${user != null && comment.status.name() == 'CHECK'}"
					th:onclick="'checkComment(\''+${comment.id}+'\')'"
					style="margin-right: 8px"><span class="glyphicon glyphicon-ok"
					aria-hidden="true"></span></a> <a href="###" style="margin-right: 8px"
					th:onclick="'toReply(\''+${comment.id}+'\')'"><span
					class="glyphicon glyphicon-comment" aria-hidden="true"></span></a> <a
					href="###" th:unless="${#lists.isEmpty(comment.parents)}"
					th:onclick="'queryConversations(\''+${comment.id}+'\')'">查看对话</a>
			</h5>
			<iterator
				th:if="${comment.parents.size() < (max-1) && comment.children.size() > 0}"
				th:remove="tag" th:each="child : ${comment.children}">
			<div th:replace="fragment :: treeComment(${comment},${child},${max})"></div>
			</iterator>
		</div>
		<iterator
			th:if="${comment.parents.size() >= (max-1) && comment.children.size() > 0}"
			th:remove="tag" th:each="child : ${comment.children}">
		<div th:replace="fragment :: treeComment(${comment},${child},${max})"></div>
		</iterator>
	</div>
</div>